<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>爱生活--更爱弹幕</title>
    <meta name="mobile-web-app-capable" content="yes">
    <!-- Add to homescreen for Safari on iOS -->
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-title" content="传感器专家网"/>
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
    <script src="http://btmgyc.sensorexpert.com.cn/static/js/jquery-1.12.4.min.js"></script>
    <script src="http://btmgyc.sensorexpert.com.cn/static/js/media.js"></script>
    <script src="http://btmgyc.sensorexpert.com.cn/static/js/pop.js"></script>
</head>
<body>
<div class="send-message">
    <h2>准备弹幕</h2>
    <div>
        <textarea placeholder="没有什么问题是弹幕解决不了的...来吧！" id="textarea"></textarea>
    </div>
    <button id="sendMessage">发射</button>
</div>
</body>
<script>
    $(function () {
          $('#sendMessage').click(function () {
              if($('#textarea').val()==''){
                  return false;
              }
              $.ajax({
                  type: 'post',
                  dataType: 'json',
                  url: 'http://btmgyc.sensorexpert.com.cn/barrage',
                  data: {
                      'message':$('#textarea').val()
                  },
                  success: function (data) {
                      if(data.status==1){
                          dialog.tips({
                              title:'提示',
                              content:'发送成功',
                              type: 'success'
                          });
                          $('#textarea').val('')
                      }else{
                          dialog.tips({
                              title:'提示',
                              content:data.msg,
                              type: 'success'
                          });
                      }
                  }
              })
          });
    });
</script>
<style>
    body{
        padding: 0;
        margin: 0;
        background-color: #F4F8FB;
    }
    .send-message>div{

    }
    .send-message {
        margin: 0 0.3rem;
    }
    .send-message h2{
        font-size: 0.48rem;
        color: #333333;
        font-weight: 700;
    }
    .send-message textarea{
        padding: 0.3rem;
        font-size: 0.28rem;
        width: calc(100% - 0.6rem);
        border: none;
        height: 6.84rem;
        border-radius: 0.05rem;
        background: #f3f3f3;
    }
    .send-message button{
        margin-top: 0.3rem;
        width: 100%;
        height: 0.88rem;
        background: -webkit-linear-gradient(-81deg, #316ce1, #6193f6);
        background: -o-linear-gradient(-81deg, #316ce1, #6193f6);
        background: -moz-linear-gradient(-81deg, #316ce1, #6193f6);
        background: linear-gradient(-81deg, #316ce1, #6193f6);
        border-radius: 0.06rem;
        font-size:0.28rem;
        line-height: 0.88rem;
        -webkit-box-shadow: -0.5px 11px 11px -7px #a1c7e9;
        -moz-box-shadow: -0.5px 11px 11px -7px #a1c7e9;
        -o-box-shadow: -0.5px 11px 11px -7px #a1c7e9;
        box-shadow: -0.5px 11px 11px -7px #a1c7e9;
        color: white;
        border: none;
    }
    .am-tips{
        font-size: 0.14rem;
        position: fixed;
        z-index: 99999;
        width: 100%;
        left: 0;
        top:0px;
        pointer-events: none;
    }
    .am-tips span{
        font-size:0.14rem;
        color: #fff;
    }
    .am-tips i{
        /* width: 100px; */
        height: 0.18rem;
        line-height: 0.18rem;
        display: inline-block;
        /* line-height: 0.28rem; */
        font-size: 0.14rem;
        font-style: normal;
        margin-right: 0.06rem;
    }
    .am-view-notice{
        padding: 0.08rem;
        text-align: center;
        transition: height .3s ease-in-out,padding .3s ease-in-out;
    }
    .am-view-notice-content {
        display: inline-block;
        pointer-events: all;
        padding: 0.1rem 0.4rem;
        border-radius: 4px;
        box-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
        opacity: 70%;
        position: relative;
        cursor: pointer;
        background-color: #0E63AF;
        overflow: hidden;
    }

</style>
</html>